package yhao.demo.service.erp.workflow.dao;

import yhao.demo.service.erp.workflow.apilist.form.flow.FlowNodeNotifyQueryForm;
import yhao.demo.service.erp.workflow.apilist.form.task.*;
import yhao.demo.service.erp.workflow.apilist.model.task.TaskModel;
import yhao.demo.service.erp.workflow.apilist.model.task.TaskNodeItemModel;
import yhao.demo.service.erp.workflow.apilist.model.task.TaskNodeNotifyModel;
import yhao.demo.service.erp.workflow.apilist.model.task.TaskNodeWarnModel;
import yhao.infra.common.model.Pagination;

import java.util.Date;
import java.util.List;

public interface TaskDao {
    void startNewTask(TaskStartForm form);

    TaskModel pickTaskById(String id);

    void taskGoToNext(TaskModel task);

    void taskGoToEnd(TaskModel task);

    void updateNodeItemResult(TaskNodeItemForm item);

    List<TaskNodeItemModel> queryTaskNodeItem(TaskNodeItemQueryForm queryForm);

    void insertTaskNodeItem(List<TaskNodeItemModel> taskNodes);

    void insertHistory(TaskHistoryForm form);

    List<TaskNodeNotifyModel> queryTaskNodeNotify(FlowNodeNotifyQueryForm form);

    TaskNodeWarnModel selectTaskNodeWarn(TaskNodeWarnBaseForm query);

    void resetTaskNodeWarn(TaskNodeWarnModel warnModel);

    void insertTaskNodeWarn(TaskNodeWarnModel warnModel);

    void closeTaskNodeWarn(TaskNodeWarnCloseForm form);

    void queryUnFlowTask(Pagination<TaskNodeWarnModel> page, Date checkTime);

    void checkTaskNodeWarn(TaskNodeWarnModel warn);

    void updateTaskNodeWarnCheckTime(TaskNodeWarnCheckTimeUpdateForm form);

    void queryTask(Pagination<TaskModel> page, TaskQueryForm form);

    List<TaskModel> queryTaskByParentId(String parentTaskId);

    void changeTaskStatus(TaskStatusChangeForm form);
}
